<?php
include("db_fns.php");
$gid = $_GET["gid"];
session_start();
?>


<html>
<head>
<title>goods detail</title>
</head>
<body>
<?php 
 include("../include_htmls/header.php");   						//复用页面的头部
?>
<table>

<?php 
	$_SESSION["gid"] = $gid;
//	echo $gid;
	$goodsbaseinfo = get_goodsbinfo($gid);
	$imagepath = get_imagepath($gid);
	$gname = $goodsbaseinfo["gname"];
	$gprice = $goodsbaseinfo["gprice"];
	$gscore = $goodsbaseinfo["gscore"];
	$gcount = $goodsbaseinfo["gsoldcount"];
	echo "<tr><td><img src = $imagepath></td></tr>";
	echo "<tr><td>商品名称：$gname </td></tr>";
	echo "<tr><td>商品价格：$gprice</td></tr>";
	echo "<tr><td>商品得分：$gscore</td></tr>";
	echo "<tr><td>出售件数: $gcount</td></tr>";
	
	?>
	<tr><td>
	<form action=http://localhost/e-commerce/user_php/chart.php method=GET> 
	<input type=submit value=添加到购物车>
	</form>

</table>
</body>
</html>